#ifndef DECLARATIVEENVIRONMENTEX_H
#define DECLARATIVEENVIRONMENTEX_H

#include <defs/export.h>
#include <defs/global.h>
#include <core/entityobject.h>
#include <QtCore>
#include <QtDeclarative>

namespace Opl{ namespace Scripting {


O_PRIVATE_DECLARE(DeclarativeEnvironment);
class SCRIPTING_EXPORT DeclarativeEnvironment : public Opl::Core::EntityObject {
    Q_OBJECT
public:

	virtual QDeclarativeItem* declarativeItem() = 0;
	virtual QString errorString() = 0;
	virtual bool initialize(const QUrl& url, bool newWindow/* = false*/) = 0;
	virtual QObject* exec() = 0;
	virtual void registerObject(const QString& name, Opl::Core::EntityObject* object, const QString& package = "") = 0;

	virtual QObject* object()const = 0;
	virtual QDeclarativeComponent* component() = 0;

	DeclarativeEnvironment(Opl::Core::EntityObject *parent = 0);
	virtual ~DeclarativeEnvironment();
private:
	O_PRIVATE_DECLARE_MEMBER(DeclarativeEnvironment)
};

}}
#endif // DECLARATIVEENVIRONMENTEX_H

